<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            width: 200px;
            height: 200px;
            border: 1px solid red;
            /*设置超出部分是否显示*/
            overflow: hidden;/*隐藏*/
            overflow: visible;/*可见*/
            overflow: scroll;/*滚动查看*/
        }
        img{
            width: 200px;
            height: 200px;
            vertical-align: top;/*向上对齐*/
            vertical-align: middle;/*向中对齐*/
            vertical-align: bottom;/*向下对齐*/
            vertical-align: baseline;/*基线对齐 默认对齐方式*/
        }
    </style>
</head>
<body>
<input type="text"><img src="../2.png">
<div>
    <img src="../2.png">
</div>
</body>
</html>